package com.guomao.demos;

import java.util.ArrayList;
import java.util.List;

public class CollectionDemoB {

    public static void main(String[] args) {


//        Collection<String> c = new ArrayList<String>();
        List<String> c = new ArrayList<String>();
        c.add("A");


        c.add("D");
        c.add("B");
        c.add("C");
//        String s = c.get(1);
//        List<Integer> c2 = new ArrayList<Integer>();
//        Integer i = c2.get(2);

        System.out.println(c);

        c.add(0,"X");

        System.out.println(c);

        c.set(0,"Z");

        System.out.println(c);

        System.out.println(c.get(0));

        String remove = c.remove(0);
        System.out.println(remove);

        System.out.println(c);


        //ArrayList / LinkedList / stack /vector
        //

    }
}
